<style>
    .xh-form .btn{
        margin-right: 0px;
    }
    .xh-form tr td:nth-child(2n){
        padding: 5px 20px 5px 0;
    }
    td >label{
        float: right;
        margin-right: 10px;
    }
    body{
        background-color: #f9f9f9;
    }
</style>

<script>
    var formData = {% if formData is defined %} {{ formData | json_encode }} {% else %} null; {% endif %}
</script>

{% if powerScript is defined %}
    {{ powerScript }}
{% endif %}
<form id="xh_form" class="xh-form"  method="post"  style="margin-left: 20px;">
    <div class="xh-area-form">
        <table>
            <tr>
                <td style="width: 75px;"><label >商品名称</label></td>
                <td style="width: 200px;"><input name="sProdName" ></td>
                <td style="width: 75px;"><label>商品分类</label></td>
                <td style="width: 200px;">
                    <select name="iPTId" >
                        <option value="" style="display: none">请选择</option>
                        {% for id,text in prodTypes %}
                            {% if iPTId is defined and id == iPTId %}
                                <option value="{{ id }}" selected>{{ text }}</option>
                                {% else %}
                                    <option value="{{ id }}">{{ text }}</option>
                            {% endif %}
                        {% endfor %}
                    </select>
                </td>
            </tr>
            <tr>
                <td><label>品牌</label></td>
                <td>
                    {#<input type="text" name="sBrand">#}
                    <select name="iPBId">
                        <option value="" style="display: none;" selected>请选择</option>
                        {% for id,text in brand %}
                            <option value="{{ id }}">{{ text }}</option>
                        {% endfor %}
                    </select>
                </td>
                <td><label>单位</label></td>
                <td><input type="text" name="sMeasure"></td>
            </tr>
            <tr>
                <td><label>采购价</label></td>
                <td><input class="doubleInput" type="number"  name="dInPrice" step="0.01" placeholder="保留小数点后两位"></td>
                <td><label>销售价</label></td>
                <td><input class="doubleInput" type="number" name="dOutPrice" step="0.01" placeholder="保留小数点后两位"></td>
            </tr>
            <tr>
                <td><label>是否部件</label></td>
                <td>
                    <select type="text" name="bParts">
                        <option value="0" selected>否</option>
                        <option value="1">是</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td valign="middle"><label>描述</label></td>
                <td colspan="3"><textarea name="mDesc" rows="3"></textarea></td>
            </tr>
        </table>
    </div>
</form>

